package zhoug.common.zxing.activity;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;

import com.google.zxing.Result;
import zhoug.common.zxing.camera.CameraManager;

/**
 * @Author 35574
 * @Date 2020/12/9
 * @Description
 */
public interface ICaptureActivity {
    /**
     * 扫码结果处理
     * @param rawResult
     * @param bundle
     */
    void handleDecode(Result rawResult, Bundle bundle);

    /**
     * @see Activity#setResult(int, Intent)
     * @param resultCode
     * @param data
     */
    void setResult(int resultCode, Intent data);

    /**
     * @see Activity#finish()
     */
    void finish();

    CameraManager getCameraManager();

    Handler getHandler();

    /**
     * 生成最终的截取的矩形
     * @return
     */
    Rect getCropRect();

}
